package com.gzcstec.stmp.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 邮箱连接池配置
 */
@Data
@Component
@ConfigurationProperties(prefix = "stmp-pool")
public class StmpPoolConfig {

    /*最大连接数*/
    private Integer maxTotal;
    /*最小空闲*/
    private Integer minIdle;
    /*最大空闲*/
    private Integer maxIdle;
    /*最大等待时间*/
    private Long maxWait;
    /*池对象耗尽之后是否阻塞,maxWait<0时一直等待*/
    private Boolean blockWhenExhausted;
    /*取对象是验证*/
    private Boolean testOnBorrow;
    /*回收验证*/
    private Boolean testOnReturn;
    /*创建时验证*/
    private Boolean testOnCreate;
    /*空闲验证*/
    private Boolean testWhileIdle;
    /*后进先出*/
    private Boolean lifo;

}
